<html lang="en"><head>
    <meta charset="UTF-8">


    <link rel="apple-touch-icon" type="image/png" href="https://cpwebassets.codepen.io/assets/favicon/apple-touch-icon-5ae1a0698dcc2402e9712f7d01ed509a57814f994c660df9f7a952f3060705ee.png">

    <meta name="apple-mobile-web-app-title" content="CodePen">

    <link rel="shortcut icon" type="image/x-icon" href="https://cpwebassets.codepen.io/assets/favicon/favicon-aec34940fbc1a6e787974dcd360f2c6b63348d4b1f4e06c77743096d55480f33.ico">

    <link rel="mask-icon" type="image/x-icon" href="https://cpwebassets.codepen.io/assets/favicon/logo-pin-b4b4269c16397ad2f0f7a01bcdf513a1994f4c94b8af2f191c09eb0d601762b1.svg" color="#111">




    <script src="https://cpwebassets.codepen.io/assets/common/stopExecutionOnTimeout-2c7831bb44f98c1391d6a4ffda0e1fd302503391ca806e7fcc7b9b87197aec26.js"></script>


    <title>CSS Grid: Floor Plan</title>

    <link rel="canonical" href="https://codepen.io/oliviale/pen/moLrBq">
    <link href="https://fonts.googleapis.com/css?family=Poppins:400,600" rel="stylesheet">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.4.1/css/simple-line-icons.min.css">

    <style>
        body {
            background: #fff;
            font-family: "Poppins", sans-serif;
        }

        aside.context {
            text-align: center;
            color: #333;
            line-height: 1.7;
        }
        aside.context a {
            text-decoration: none;
            color: #333;
            padding: 3px 0;
            border-bottom: 1px dashed;
        }
        aside.context a:hover {
            border-bottom: 1px solid;
        }
        aside.context .explanation {
            max-width: 700px;
            margin: 8em auto 0;
        }

        footer {
            text-align: center;
            margin: 4em auto;
            width: 100%;
        }
        footer a {
            text-decoration: none;
            display: inline-block;
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background: transparent;
            border: 1px dashed #333;
            color: #333;
            margin: 5px;
        }
        footer a:hover {
            background: rgba(0, 0, 0, 0.05);
        }
        footer a .icons {
            margin-top: 12px;
            display: inline-block;
            font-size: 20px;
        }

        .main-content {
            margin: 6em auto;
            display: grid;
            width: 750px;
            grid: 100px 80px 160px 100px 120px/80px 80px repeat(2, 1fr) 75px 75px 2fr;
            border: 4px solid #096b72;
            border-width: 4px 0 0 4px;
            position: relative;
        }
        .main-content > div {
            position: relative;
        }
        .main-content > .door-hor {
            top: -4px;
            left: 15px;
        }

        .utility {
            grid-column: 1/span 1;
            grid-row: 1/span 2;
            border: 4px solid #096b72;
            border-width: 0 4px 4px 0;
        }
        .utility .door-hor {
            bottom: -34px;
            left: 18px;
        }

        .kitchen {
            grid-row: 1/span 3;
            grid-column: 3/span 2;
        }
        .kitchen .island {
            position: absolute;
            width: 100px;
            height: 45px;
            border: 2px solid #096b72;
            top: 100px;
            left: 50px;
        }
        .kitchen .island:before, .kitchen .island:after,
        .kitchen .island .chair {
            content: "";
            position: absolute;
            width: 25px;
            height: 25px;
            bottom: -35px;
            border-radius: 50%;
            border: 2px solid #096b72;
            left: 5px;
            background: #ffc107;
        }
        .kitchen .island:after {
            left: 38px;
        }
        .kitchen .island .chair {
            left: 70px;
        }
        .kitchen .rug {
            width: 40px;
            height: 40px;
            top: 50px;
            right: 45px;
        }
        .kitchen .ref {
            position: absolute;
            border: 2px solid #096b72;
            top: -2px;
            width: 45px;
            height: 40px;
            left: 8px;
        }
        .kitchen .cabinets {
            position: absolute;
            border: 2px solid #096b72;
            top: -2px;
            width: 120px;
            height: 40px;
            right: 37px;
        }
        .kitchen .cabinets .stove {
            position: absolute;
            width: 54px;
            height: 32px;
            border: 2px solid #096b72;
            right: 2px;
            top: 2px;
        }
        .kitchen .cabinets .stove:before, .kitchen .cabinets .stove:after {
            content: "";
            position: absolute;
            width: 16px;
            height: 16px;
            top: 5px;
            border-radius: 50%;
            border: 2px solid #096b72;
            left: 5px;
        }
        .kitchen .cabinets .stove:after {
            right: 5px;
            left: auto;
        }
        .kitchen .sink {
            position: absolute;
            right: -1px;
            border: 2px solid #096b72;
            top: -2px;
            width: 35px;
            height: 98px;
        }
        .kitchen .sink .sink-tap-1,
        .kitchen .sink .sink-tap-2 {
            position: absolute;
            width: 19px;
            height: 15px;
            border: 2px solid #096b72;
            right: 8px;
            bottom: 27px;
            border-radius: 4px;
        }
        .kitchen .sink .sink-tap-2 {
            bottom: 10px;
            height: 10px;
        }
        .kitchen .sink .sink-tap-2:before {
            content: "";
            position: absolute;
            border-radius: 50%;
            width: 4px;
            height: 4px;
            border: 1px solid #096b72;
            right: -8px;
            top: -6px;
        }

        .bathroom-2 {
            grid-column: 5/span 2;
            border: 4px solid #096b72;
            border-width: 0 0 4px 4px;
        }
        .bathroom-2 .rug {
            width: 45px;
            height: 25px;
            top: 45%;
            left: 25px;
            transform: rotate(-40deg);
            z-index: 20;
        }
        .bathroom-2 .door-hor {
            bottom: -4px;
            left: 40px;
            transform: rotate(180deg);
        }
        .bathroom-2 .window-hor {
            left: 30px;
        }
        .bathroom-2 .toilet {
            left: auto;
            right: 8px;
        }
        .bathroom-2 .vanity {
            bottom: auto;
            top: -2px;
            width: 50px;
        }

        .bedroom-2 {
            grid-column: 7/span 1;
            grid-row: 1/span 2;
            border: 4px solid #096b72;
            border-width: 0 4px 4px;
        }
        .bedroom-2 .door-ver {
            left: -4px;
            bottom: 10px;
            transform: scaleY(-1);
        }
        .bedroom-2 .window-hor {
            left: 45px;
            width: 120px;
        }

        .living-room {
            grid-column: 5/span 3;
            grid-row: 3/span 1;
            border: 4px solid #096b72;
            border-width: 0 4px 0 0;
        }

        .bedroom-1 {
            grid-column: 1/span 4;
            grid-row: 4/span 2;
            border: 4px solid #096b72;
            border-width: 4px 4px 4px 0;
        }
        .bedroom-1 .rug {
            left: 20%;
            top: 20%;
            height: 150px;
        }
        .bedroom-1 .door-hor {
            top: -4px;
            left: 40px;
        }
        .bedroom-1 .window-hor {
            left: 30px;
            top: auto;
            bottom: -6px;
            width: 200px;
        }
        .bedroom-1 .bed {
            height: 100px;
            width: 170px;
            transform: scaleX(-1);
            left: -2px;
            top: 70px;
        }
        .bedroom-1 .bed .pillow {
            height: 35px;
            top: 8px;
            right: 15px;
        }
        .bedroom-1 .bed .pillow:nth-child(3) {
            bottom: 8px;
            top: auto;
        }
        .bedroom-1 .bed-table {
            width: 25px;
            height: 25px;
            top: 37px;
            right: auto;
            left: -2px;
        }
        .bedroom-1 .bed-table:nth-child(5) {
            top: auto;
            bottom: 5px;
            width: 25px;
            height: 25px;
        }

        .closet {
            grid-column: 4/span 1;
            grid-row: 4/span 1;
            z-index: 3;
            border-left: 4px solid #096b72;
        }
        .closet .wall-gap {
            left: -4px;
            top: 30px;
        }

        .bathroom-1 {
            grid-column: 4/span 2;
            grid-row: 5/span 1;
            z-index: 2;
            border: 4px solid #096b72;
            background: #fff;
        }
        .bathroom-1 .door-ver:nth-child(1) {
            left: -4px;
            bottom: 10px;
            transform: scaleY(-1);
        }
        .bathroom-1 .door-ver:nth-child(2) {
            right: -4px;
            bottom: 40px;
            transform: scaleX(-1);
        }
        .bathroom-1 .window-hor {
            top: auto;
            bottom: -6px;
            right: 30px;
        }
        .bathroom-1 .rug {
            width: 50px;
            height: 20px;
            top: 55px;
            left: 100px;
            z-index: 20;
        }

        .office {
            grid-row: 4/span 2;
            grid-column: 5/span 3;
            border: 4px solid #096b72;
            border-width: 4px 0;
        }
        .office .door-hor {
            top: -4px;
            left: 45px;
        }
        .office .window-hor {
            top: auto;
            bottom: -6px;
            left: 82px;
            width: 54px;
        }
        .office .table {
            width: 160px;
            height: 25px;
            transform: scaleY(-1);
            top: -4px;
            right: 65px;
        }

        .patio {
            grid-row: 4/span 2;
            grid-column: 7/span 1;
            margin-top: 4px;
            position: relative;
        }
        .patio:before {
            content: "";
            width: 140%;
            height: 4px;
            background: #096b72;
            bottom: 50%;
            left: -21%;
            transform: rotate(-44deg);
            position: absolute;
        }
        .patio:after {
            content: "";
            width: 140%;
            height: 140px;
            bottom: 0;
            right: 0;
            position: absolute;
            width: 0;
            height: 0;
            border-bottom: 215px solid #fff;
            border-left: 223px solid transparent;
        }
        .patio .real-patio {
            width: 139%;
            height: 80px;
            position: absolute;
            z-index: 20;
            transform: rotate(-44deg);
            bottom: 39px;
            margin-left: -20px;
            border: 2px solid #096b72;
            border-width: 0 2px 2px 2px;
        }

        /*utilities*/
        .wall-gap {
            position: absolute;
            background: #fff;
            width: 4px;
            height: 40px;
        }

        .door-hor {
            position: absolute;
            background: #fff;
            width: 45px;
            height: 35px;
            overflow: hidden;
            z-index: 10;
        }
        .door-hor:before {
            content: "";
            position: absolute;
            background: #fff;
            width: 2px;
            height: 31px;
            border: 1px solid #096b72;
        }
        .door-hor:after {
            content: "";
            position: absolute;
            width: inherit;
            height: 80px;
            width: 130px;
            right: -1px;
            bottom: -0.5px;
            border-radius: 50%;
            border: 1px solid #096b72;
        }

        .door-ver {
            position: absolute;
            background: #fff;
            height: 45px;
            width: 35px;
            overflow: hidden;
            z-index: 10;
        }
        .door-ver:before {
            content: "";
            position: absolute;
            background: #fff;
            height: 2px;
            width: 31px;
            border: 1px solid #096b72;
        }
        .door-ver:after {
            content: "";
            position: absolute;
            width: inherit;
            width: 80px;
            height: 130px;
            right: -1px;
            bottom: 0.5px;
            border-radius: 50%;
            border: 1px solid #096b72;
        }

        .door-sliding {
            position: absolute;
            background: linear-gradient(to right, #096b72 0, #096b72 8%, #fff 8%, #fff 92%, #096b72 92%);
            width: 200px;
            height: 6px;
            transform: rotate(-44deg);
            bottom: 50%;
            margin-bottom: -9px;
            z-index: 15;
        }
        .door-sliding:before, .door-sliding:after {
            content: "";
            position: absolute;
            height: 2px;
            width: 70%;
            border: 1px solid #096b72;
        }
        .door-sliding:before {
            top: -1px;
        }
        .door-sliding:after {
            right: 0;
            bottom: 0;
        }

        .window-hor {
            position: absolute;
            top: -6px;
            height: 6px;
            border: 2px solid #096b72;
            width: 80px;
            background: #e2f0f1;
            z-index: 10;
        }

        .window-ver {
            position: absolute;
            right: -6px;
            top: 8px;
            height: 140px;
            border: 2px solid #096b72;
            width: 6px;
            background: #e2f0f1;
        }

        .vanity {
            width: 90px;
            height: 30px;
            position: absolute;
            border: 2px solid #096b72;
            bottom: -2px;
            right: -2px;
        }
        .vanity:before {
            content: "";
            position: absolute;
            border: 1px solid #096b72;
            box-shadow: 0 0 0 2px #fff, 0 0 0 3px #096b72;
            height: 15px;
            width: 15px;
            border-radius: 50%;
            top: 5px;
            left: 50%;
            margin-left: -7.5px;
        }

        .toilet {
            width: 30px;
            height: 8px;
            position: absolute;
            border: 2px solid #096b72;
            bottom: -2px;
            left: 40px;
        }
        .toilet:after {
            content: "";
            position: absolute;
            border: 2px solid #096b72;
            height: 22px;
            width: 20px;
            border-radius: 20px 20px 0 0;
            top: -26px;
            left: 50%;
            margin-left: -12px;
        }

        .bathtub {
            width: 110px;
            height: 48px;
            position: absolute;
            border: 2px solid #096b72;
            top: -2px;
            left: -2px;
        }
        .bathtub:before {
            content: "";
            position: absolute;
            width: 85px;
            height: 25px;
            border-radius: 3px;
            border: 2px solid #096b72;
            top: 10px;
            left: 10px;
        }

        .shower {
            width: 55px;
            height: 50px;
            position: absolute;
            border: 2px solid #096b72;
            top: -2px;
            left: -2px;
            border-radius: 0 0% 2000% 0;
        }
        .shower:before {
            content: "";
            position: absolute;
            border-radius: 50%;
            width: 6px;
            height: 6px;
            border: 1px solid #096b72;
            left: 6px;
            top: 6px;
        }

        .bed {
            width: 140px;
            height: 70px;
            position: absolute;
            border: 2px solid #096b72;
            right: -2px;
            top: 35px;
            border-radius: 8px 0 0 8px;
            background: #fff;
        }
        .bed .blanket {
            width: 55%;
            left: 0;
            position: absolute;
            top: 0;
            height: 100%;
            border-right: 2px solid #096b72;
            background: repeating-linear-gradient(to right, transparent, transparent 6px, rgba(9, 107, 114, 0.5) 6px, rgba(9, 107, 114, 0.5) 8px), repeating-linear-gradient(to bottom, transparent, transparent 6px, rgba(9, 107, 114, 0.5) 6px, rgba(9, 107, 114, 0.5) 8px);
        }
        .bed .blanket:before {
            content: "";
            position: absolute;
            right: -18px;
            width: 0;
            height: 100%;
            border-right: 2px solid #096b72;
        }
        .bed .pillow {
            width: 25px;
            border: 2px solid #096b72;
            height: 40px;
            border-radius: 6px;
            right: 8px;
            top: 14px;
            position: absolute;
            background: #ffc107;
        }

        .bed-table {
            width: 30px;
            height: 30px;
            top: -2px;
            right: -2px;
            position: absolute;
            border: 2px solid #096b72;
        }

        .table {
            width: 90px;
            height: 15px;
            bottom: -2px;
            right: 20px;
            position: absolute;
            border: 2px solid #096b72;
        }
        .table:before {
            content: "";
            position: absolute;
            border: 2px solid #096b72;
            width: 20px;
            height: 16px;
            top: -20px;
            left: 50%;
            margin-left: -10px;
            border-radius: 40px 40px 0 0;
            background: linear-gradient(to bottom, transparent 0, transparent 50%, #096b72 50%, #096b72 60%, transparent 60%);
        }

        .sofa {
            width: 130px;
            height: 40px;
            bottom: -2px;
            right: 20px;
            position: absolute;
            border: 2px solid #096b72;
            border-radius: 8px 8px 0 0;
            background: #ffc107;
        }
        .sofa:before {
            content: "";
            position: absolute;
            border: 2px solid #096b72;
            border-width: 0 2px 2px;
            width: 80%;
            height: 70%;
            left: 8%;
            border-radius: 0 0 4px 4px;
            background: #fff;
        }
        .sofa:after {
            content: "";
            position: absolute;
            border: 2px solid #096b72;
            width: 30px;
            height: 30px;
            transform: rotate(60deg);
            left: -50px;
            bottom: 50px;
            border-radius: 6px;
            background: #ffc107;
        }

        .coffee-table,
        .patio-table {
            width: 40px;
            height: 40px;
            bottom: 60px;
            right: 80px;
            border-radius: 50%;
            position: absolute;
            border: 2px solid #096b72;
            background: #fff;
        }

        .patio-table {
            width: 30px;
            height: 30px;
            bottom: 35px;
            z-index: 25;
        }

        .patio-chair {
            width: 34px;
            height: 26px;
            bottom: 30px;
            left: 65px;
            border-radius: 20px 20px 0 0;
            position: absolute;
            border: 2px solid #096b72;
            background: #ffc107;
            z-index: 25;
            transform: rotate(-95deg);
        }
        .patio-chair:before {
            content: "";
            position: absolute;
            width: 25px;
            height: 82%;
            border-radius: inherit;
            background: #fff;
            bottom: 0;
            left: 10%;
            border: 1px solid #096b72;
            border-width: 1px 1px 0;
        }
        .patio-chair:nth-child(5) {
            transform: rotate(15deg);
            bottom: 75px;
            left: 115px;
        }

        .tv-set {
            width: 140px;
            height: 20px;
            top: -2px;
            right: 35px;
            border-radius: 0 0 50% 50%;
            position: absolute;
            border: 2px solid #096b72;
        }

        .rug {
            width: 150px;
            height: 110px;
            top: 25px;
            right: 35px;
            position: absolute;
            background: rgba(255, 193, 7, 0.25);
        }

        .name {
            font: 600 14px/1 "Poppins", sans-serif;
            text-transform: uppercase;
            color: #096b72;
            position: absolute;
            text-align: center;
            z-index: 30;
        }

        .utility .name {
            width: 200%;
            transform: rotate(-90deg);
            bottom: 45%;
            left: -38px;
        }

        .kitchen .name {
            top: 20%;
            left: 30%;
        }

        .bathroom-2 .name {
            top: 45px;
            left: 40px;
        }

        .bedroom-2 .name {
            width: 100px;
            bottom: 25px;
            left: 25px;
        }

        .living-room .name {
            top: 38px;
            left: 30%;
        }

        .bedroom-1 .name {
            width: 100px;
            top: 25px;
            left: 130px;
        }

        .closet .name {
            top: 35px;
        }

        .bathroom-1 .name {
            bottom: 40px;
            right: 50px;
        }

        .office .name {
            width: 80px;
            top: 45%;
            left: 30%;
        }

        .patio .name {
            right: 20px;
            top: 40%;
        }
    </style>

    <script>
        window.console = window.console || function(t) {};
    </script>



</head>

<body translate="no">
<div class="main-content">
    <div class="door-hor"></div>
    <div class="utility">
        <div class="door-hor"></div>
        <div class="name">utility room</div>
    </div>
    <div class="kitchen">
        <div class="ref"></div>
        <div class="rug"></div>
        <div class="cabinets">
            <div class="stove"></div>
        </div>
        <div class="sink">
            <div class="sink-tap-1"></div>
            <div class="sink-tap-2"></div>
        </div>
        <div class="island">
            <div class="chair"></div>
        </div>
        <div class="name">kitchen</div>
    </div>
    <div class="bathroom-2">
        <div class="window-hor"></div>
        <div class="door-hor"></div>
        <div class="shower"></div>
        <div class="toilet"></div>
        <div class="vanity"></div>
        <div class="rug"></div>
        <div class="name">bath #1</div>
    </div>
    <div class="bedroom-2">
        <div class="door-ver"></div>
        <div class="window-hor"></div>
        <div class="bed-table"></div>
        <div class="bed">
            <div class="blanket"></div>
            <div class="pillow"></div>
        </div>
        <div class="table"></div>
        <div class="name">guest bedroom</div>
    </div>
    <div class="living-room">
        <div class="rug"></div>
        <div class="window-ver"></div>
        <div class="sofa"></div>
        <div class="coffee-table"></div>
        <div class="tv-set"></div>
        <div class="name">living room</div>
    </div>
    <div class="bedroom-1">
        <div class="rug"></div>
        <div class="door-hor"></div>
        <div class="window-hor"></div>
        <div class="bed">
            <div class="blanket"></div>
            <div class="pillow"></div>
            <div class="pillow"></div>
        </div>
        <div class="bed-table"></div>
        <div class="bed-table"></div>
        <div class="name">master bedroom</div>
    </div>
    <div class="closet">
        <div class="wall-gap"></div>
        <div class="name">walk-in closet</div>
    </div>
    <div class="bathroom-1">
        <div class="door-ver"></div>
        <div class="door-ver"></div>
        <div class="window-hor"></div>
        <div class="rug"></div>
        <div class="bathtub"></div>
        <div class="vanity"></div>
        <div class="toilet"></div>
        <div class="name">bath #2</div>
    </div>
    <div class="office">
        <div class="door-hor"></div>
        <div class="window-hor"></div>
        <div class="table"></div>
        <div class="name">home office</div>
    </div>
    <div class="patio">
        <div class="door-sliding"></div>
        <div class="real-patio">
            <div class="name">balcony</div>
        </div>
        <div class="patio-table"></div>
        <div class="patio-chair"></div>
        <div class="patio-chair"></div>
    </div>
</div>
<aside class="context">
    <div class="explanation">Part of the <a href="https://codepen.io/collection/DQvYpQ/" target="_blank">CSS Grid collection here</a>.</div>
</aside>
<footer><a href="https://twitter.com/meowlivia_" target="_blank"><i class="icon-social-twitter icons"></i></a><a href="https://github.com/oliviale" target="_blank"><i class="icon-social-github icons"></i></a><a href="https://dribbble.com/oliviale" target="_blank"><i class="icon-social-dribbble icons"></i></a></footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script id="rendered-js">
    // /╲/\[☉﹏☉]/\╱\ <-- spider! AHH! 🕷️
    //# sourceURL=pen.js
</script>





</body></html>